/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package entity.structure;

/**
 *
 * @author dell
 */
import entity.support.Obj;
import java.util.Map;
import java.util.HashMap;
public class Part extends Obj
{
//columns_______________________________________________________________________
private String code;    
private int type;
private int num;
private String productcompany;
private String productcontact;
private String servicecompany;
private String servicecontact;
private String remark;
//functions_____________________________________________________________________
     //constructor______________________________________________________________
public Part()
{
    
}
public Part(Obj o)
{
     this.id=o.getId();
     this.name=o.getName();
     this.intime=o.getIntime();
     this.updatetime=o.getUpdatetime();
}
public Part(Map<String,String> map)
{
     
}
     //getter___________________________________________________________________
public String getCode() 
{
     return code;
}
public int getType() 
{
     return type;
}
public int getNum() 
{
     return num;
}
public String getProductcompany() 
{
     return productcompany;
}
public String getProductcontact() 
{
     return productcontact;
}
public String getServicecompany() 
{
     return servicecompany;
}
public String getServicecontact() 
{
     return servicecontact;
}
public String getRemark() 
{
     return remark;
}
     //setter___________________________________________________________________
public void setCode(String code)
{
     this.code = code;
}
public void setType(int type) 
{
     this.type = type;
}
public void setNum(int num) 
{
     this.num = num;
}
public void setProductcompany(String productcompany) 
{
     this.productcompany = productcompany;
}
public void setProductcontact(String productcontact) 
{
     this.productcontact = productcontact;
}
public void setServicecompany(String servicecompany) 
{
     this.servicecompany = servicecompany;
}
public void setServicecontact(String servicecontact) 
{
     this.servicecontact = servicecontact;
}
public void setRemark(String remark) 
{
     this.remark = remark;
}
  //operator_________________________________________________________________
public Map<String,String> getProductContactInMap()
{
     return StructureUtil.toMap(this.productcontact);
}
public Map<String,String> getServiceContactInMap()
{
     return StructureUtil.toMap(this.servicecontact);
}
     //toString_________________________________________________________________
@Override
public String toString()
{
     return super.toString()+"\t"+code+"\t"+type+"\t"+num+"\t"+productcompany+"\t"
             +productcontact+"\t"+servicecompany+"\t"+servicecontact+"\t"+remark;
}
}
